package Test.Test3;

import java.util.Scanner;

public class Zifuchuanshanchu {
    public static void main(String[] args) {
        String []arr={"aa","bb","cc","ff"};
        Scanner in=new Scanner(System.in);
        System.out.println("请输入要删除的字符串");
        String b=in.next();
        for (int i=0;i<arr.length;i++) {
            if (arr[i]!=null&&arr[i].equals(b)) {
                for (int j = i; j < arr.length - 1; j++) {
                    arr[j] = arr[j + 1];
                }
                arr[arr.length-1]=null;
                for (int j=0;j<arr.length;j++){
                    System.out.println(arr[j]+"");
                }
            }
            }

            }
        }


